import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();//They are students.
        String str2 = scan.nextLine();//aeiou
        HashMap<Character,Integer> map = new HashMap<>();
        for(int i = 0;i < str2.length();i++) {
            if(map.get(str2.charAt(i)) == null) {
                map.put(str2.charAt(i),1);
            }else {
                map.put(str2.charAt(i),map.get(str2.charAt(i))+1);
            }
        }
        String ret = "";
        for(int i = 0;i < str1.length();i++) {
            if(map.get(str1.charAt(i)) == null) {
                ret += str1.charAt(i);
            }
        }
        System.out.println(ret);
    }
}

